﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using _MetalSlug.Weapons.Units;
using Microsoft.Xna.Framework;
using _MetalSlug.Weapons.Factory;

namespace _MetalSlug.MyCharacters.Characters.Guns
{
    public class MiniGun : Gun
    {
        public MiniGun()
        {
            typeOfGun = TYPE.MINIGUN;
            countBullet = Int16.MaxValue;
        }

        public override List<Bullet> Fire(Vector2 TopLeft, Vector2 Direction)
        {
            List<Bullet> lstFiredBullet = new List<Bullet>();
            Bullet bullet = BulletStore.GetInstance().Produce(Bullet.TYPE_BULLET.MINIGUN_BULLET);
            bullet.Fire(TopLeft, Direction);
            lstFiredBullet.Add(bullet);
            
            if (!GameUtil.Audio.IsMuting)
            {
                GameUtil.Audio.ShotMiniGun.Play();
            }
            return lstFiredBullet;
        }

        public override Gun Clone()
        {
            Gun gun = new MiniGun();
            gun.Copy(this);
            return gun;
        }
    }
}
